home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: MacApp to ODF conversion
- Sent: 5/3/96 6:20 PM
- Received: 5/6/96 8:55 AM
- From: Brian Arnold, arnold@lumina.com
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >Has anyone out there tried to convert a MacApp project to an ODF project?
- >Tips, opinions, suggestions, caveats, mistakes would be appreciated.
-
- Hi,
-
- I haven't tried to convert so much as I've tried to plan to convert. I'm
- waiting for ODF 1 to ship in a couple of weeks. I'm going to WWDC to learn
- as much as I can about the recent changes to ODF. Here's what I did to
- prepare.
-
- 1. I extracted engine functionality from my app and converted the engine
- code into a CFM shared library / Windows95 32-bit DLL [SOM wrapper tbd].
- Plug: Metrowerks x86 got me running in just a couple of weeks, and
- produced a faster executable than our previous Borland C++ build.
-
- 2. I detangled user interface functionality, separating it out into
- a non-MacApp-derived class hierarchy and a MacApp-derived class
- hierarchy. My motivation for this type of separation stemmed from
- a previous, painful, aborted MacApp 2->3 upgrade.
-
- 2.1 The non-MacApp classes are designed to be extensible mediators/
- observers that use a singleton to represent the engine.
- 2.2 The MacApp subclasses act as (or with) proxies for the mediators.
-
- (I pulled out my "Design Patterns" book just to use those big words)
-
- An interesting thing happens when you do this. The MacApp
- subclasses tend to to MacApp things (or Toolbox things), and
- the non-MacApp classes tend to to _app-specific_ and _platform-
- independent_ things. Although there are a lot more classes
- compared to using a single MacApp-derived soup, you get a
- flattening of hierarchy and better division of responsibilities.
-
- 3. With this architecture, the only classes that die a horrible death
- in a radical framework switch are the proxies. I can then use ODF
- to rapidly re-implement those proxies. (Were it so simple! ;-)
-
- 4. I toyed around with ODF d1, d6 and d9 to explore different ideas
- about how to work with OpenDoc. To get the basic interface of my app
- (sans gridviews, popups, etc., remember this was pre-release ODF)
- would take about two days, largely re-implementing the menus
- and windows from scratch and reusing sample part code. I also learned
- how to call my CFM library from OpenDoc, how to adapt ODF Draw to do
- structured diagram editing, and how to drag a document created by my
- MacApp application into my OpenDoc part, subsuming its contents.
- Lastly, I learned that it's hard to track "d" releases with limited
- time to spend on "R&D"; hence I look forward to ODF 1!
-
- I can't say much about actually converting from MacApp to ODF until after
- WWDC, when I've had some time to work with ODF 1, but I hope these notes on
- what I'm doing to prepare are of some use.
-
- - Brian
-
- ---------------------------------------------------------------
- Brian Arnold arnold@lumina.com
- Director of Software Development
- Lumina Decision Systems, Inc. http://www.lumina.com/
-
-